-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Safari improvements #34
Conversation
Apparently it's better to animate translate instead of background-position. Needs checking on an actual mac. You may need to remove `Header` and `CTA` from the homepage first as they're also laggy.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@jasonappah and @Jake3231 would y'all test this and maybe put a little work into it. I was just going around removing things until it stopped lagging, getting more and more specific, maybe y'all can do the same. |
There is still a rendering issue with the components on MacOS, I'll look into it too |
…b and Blob components
I can take a look at this too |
So far much improved, but not 100% there. |
An easier but less cool solution could be to conditionally apply some JS/CSS that disables the background animations on Safari. This could be done by accessing the userAgent string. What do y'all think? |
I had typed out a comment on this pr a couple days ago but apparently didn't hit send here 😔 I'm good with disabling the hero animation on Safari until we can figure out a better solution. Not too sure what other options would be good to explore here tbh. The stars animation wasn't planned/in Figma, it was just a nice to have that I added. If we also need to disable it/remove it all together, that's also fine |
I agree with @jasonappah that disabling the hero animation for Safari is a fine solution for now to keep the project moving forward on all platforms. Might be a nice low priority fix later. Just something to watch out for, I think iPad reports its user agent as desktop OS X , and iPhone is reporting as iOS. Only actual macOS Safari is having the issue. |
Last time I worked on it the main issue was with using the Blob file and components for animations. They slowed down the performance, which is why I disabled/removed them from the landing page. |
This reverts commit 67ebb0f.
@nl32 and I tested on Safari on macOS, this is significantly better now. |
I think this should be ready then! |
Tested again on Safari 17.4.1 and it's a bit improved on old and patched versions, but it's still much better on this branch. Apple made some big Safari perf/compatibility fixes over the course of macOS 14's release cycle, and it seems that this is getting some benefit. |
I've noticed my cpu idles at like 5% on the normal site as opposed to 1% on this branch (Chrome) so these changes are probably good for all browsers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Runs great :)
On the main page, the
Header
,Projects
, andCTA
all seem to cause webkit lag.In the header it seems like it's
useBlobBg.tsx
causing problems. Not sure why.I may have fixed the projects. Apparently it's better to animate
translate
instead ofbackground-position
. It needs testing on an actual mac tho. The animation might be too fast and there may be a line showing up between the two images animating.In the CTA the
Blob
elements seem to be causing lag but they're not animating so idk why. Maybe also the radial gradients. Or maybe it's just my webkit emulator.In testing each of these it's probably best to remove the other two from the
index.tsx
file.